{if $acao == "adicionar" || $acao == "editar"}
			<!-- Modal Ambiente -->
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="modalAmbiente">{if $acao == "adicionar"}Adicionar{else}Editar{/if} Ambiente</h4>
			</div>
			<form id="{if $acao == "adicionar"}adicionar{else}editar{/if}Ambiente" class="form-horizontal" role="form" method="post" action="">
				<div class="modal-body">
					<div class="progressBar">
						<img src="images/spin.gif" width="32" height="32" />
					</div>	
					<div class="form-group">		
						<label for="nome" class="col-sm-5 control-label">Nome</label>
  							<div class="col-xs-5">
    			 				<input type="text" class="form-control" id="name" placeholder="Nome" />
  				 			</div>	
 					</div>			
					<div class="form-group">		
						<label for="tipo" class="col-sm-5 control-label">Tipo</label>
  							<div class="col-xs-5">
    			 				<input type="text" class="form-control" id="type" placeholder="Tipo"{if $tipoUsuario != 1} disabled="disabled"{/if} />
  				 			</div>	
					</div>
					<div class="form-group">		
						<label for="info" class="col-sm-5 control-label">Informa&ccedil;&otilde;es</label>
  							<div class="col-xs-5">
    			 				<input type="text" class="form-control" id="info" placeholder="Informa&ccedil;&otilde;es">
  				 			</div>	
 					</div>		
 					<div class="form-group">
		   				 <label for="info" class="col-sm-5 control-label">Etiqueta NFC</label>
		   				 <div class="col-xs-5">
		     			 	<input type="text" class="form-control" id="idNfc" placeholder="Etiqueta NFC" />
		   				 </div>
		   			</div>						
					<div class="form-group">		
						<label for="latitude" class="col-sm-5 control-label">Latitude</label>
  							<div class="col-xs-5">
    			 				<input type="text" class="form-control" id="latitude" placeholder="Latitude"{if $tipoUsuario != 1} disabled="disabled"{/if} />
  				 			</div>	
 					</div>
					<div class="form-group">		
						<label for="longitude" class="col-sm-5 control-label">Longitude</label>
  							<div class="col-xs-5">
    			 				<input type="text" class="form-control" id="longitude" placeholder="Longitude"{if $tipoUsuario != 1} disabled="disabled"{/if} />
  				 			</div>	
 					</div>
					<div class="form-group">		
						<label for="endereco" class="col-sm-5 control-label">Endere&ccedil;o</label>
  							<div class="col-xs-5">
    			 				<input type="text" class="form-control" id="address" placeholder="Endere&ccedil;o"{if $tipoUsuario != 1} disabled="disabled"{/if} />
  				 			</div>	
 					</div>
					<div class="form-group">		
						<label for="bairro" class="col-sm-5 control-label">Bairro</label>
  							<div class="col-xs-5">
    			 				<input type="text" class="form-control" id="district" placeholder="Bairro"{if $tipoUsuario != 1} disabled="disabled"{/if} />
  				 			</div>	
 					</div>
					<div class="form-group">		
						<label for="numero" class="col-sm-5 control-label">N&uacute;mero</label>
  							<div class="col-xs-5">
    			 				<input type="text" class="form-control" id="number" placeholder="N&uacute;mero"{if $tipoUsuario != 1} disabled="disabled"{/if} />
  				 			</div>	
 					</div>
					<div class="form-group">		
						<label for="cidade" class="col-sm-5 control-label">Cidade</label>
  							<div class="col-xs-5">
    			 				<input type="text" class="form-control" id="city" placeholder="Cidade"{if $tipoUsuario != 1} disabled="disabled"{/if} />
  				 			</div>	
 					</div>
 					<div class="form-group">		
						<label for="estado" class="col-sm-5 control-label">Estado</label>
  							<div class="col-xs-5">
    			 				<input type="text" class="form-control" id="state" placeholder="Estado"{if $tipoUsuario != 1} disabled="disabled"{/if} />
  				 			</div>	
 					</div>
 					<div class="form-group">		
						<label for="pais" class="col-sm-5 control-label">Pa&iacute;s</label>
  							<div class="col-xs-5">
    			 				<input type="text" class="form-control" id="country" placeholder="Pa&iacute;s"{if $tipoUsuario != 1} disabled="disabled"{/if} />
  				 			</div>	
 					</div>
					<div class="form-group">		
						<label for="listaAdmAmbiente" class="col-sm-5 control-label">Administrador do Ambiente</label>
  							<div class="col-xs-5">
    			 				<select class="form-control" id="environmentAdmId"{if $tipoUsuario != 1} disabled="disabled"{/if}>...</select>
  				 			</div>	
 					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
					<button type="submit" class="btn btn-success">{if $acao == "adicionar"}Adicionar{else}Editar{/if}</button>
				</div>
			</form>
{elseif $acao == "remover"}
		<!-- Modal Remover Ambiente -->
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="modalRemoverAmbiente">Remover Ambiente</h4>
			</div>
			<form class="form-horizontal" role="form" method="" action="">
				<div class="modal-body">
					<p>Você deseja realmente remover os ambientes selecionados?</p>
				</div>								
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
					<button type="submit" class="btn btn-danger">Remover</button>
				</div>
			</form>
{else}
{include file="FragmentoCabecalho.html"}
{include file="FragmentoConteudoCabecalho.html"}
{include file="FragmentoMenu.html"}

	<div class="panel panel-default">
		<div class="panel-heading"><h3>Gerenciar Ambientes</h3></div>
		<div class="panel-body">
 			<div class="form-group">
	{if $tipoUsuario == 1}
 				<a data-toggle="modal" id="btnAdicionarAmbiente" data-target="#modalAdicionar" href="index.php?controle=manterambiente&acao=adicionar" class="btn btn-default btn-lg">
					<span class="glyphicon glyphicon-plus"></span>
				</a>	
	{/if}			
				<a data-toggle="modal" id="btnEditarAmbiente" data-target="#modalEditar" href="index.php?controle=manterambiente&acao=editar" class="btn btn-default btn-lg">
					<span class="glyphicon glyphicon-edit"></span>
				</a>
	{if $tipoUsuario == 1}			
				<a data-toggle="modal" id="btnRemoverAmbiente"  data-target="#modalRemover" href="index.php?controle=manterambiente&acao=remover" class="btn btn-default btn-lg">
					<span class="glyphicon glyphicon-remove"></span>
				</a>	
	{/if}							
			</div>		
			<table class="table table-striped table-bordered" id="listaAmbientes">
				<thead>
					<tr>
						<td><strong>ID</strong></td>
						<td><strong>Nome</strong></td>
						<td width="20%"><strong>Tipo</strong></td>
						<td width="30%"><strong>Administrador</strong></td>
					</tr>
				</thead>
			</table>
		</div>
	</div>
	
	<!-- Modal Adicionar -->
	<div class="modal fade" id="modalAdicionar" tabindex="-1" role="dialog" aria-labelledby="modalAmbiente" aria-hidden="true">
		<div class="modal-dialog">
	    	<div class="modal-content">
			</div><!-- /.modal-content -->
		</div><!-- /.modal-dialog -->
	</div><!-- /.modal -->
	
	<!-- Modal Editar -->
	<div class="modal fade" id="modalEditar" tabindex="-1" role="dialog" aria-labelledby="modalAmbiente" aria-hidden="true">
		<div class="modal-dialog">
	    	<div class="modal-content">
			</div><!-- /.modal-content -->
		</div><!-- /.modal-dialog -->
	</div><!-- /.modal -->
	
	<!-- Modal Remover -->
	<div class="modal fade" id="modalRemover" tabindex="-1" role="dialog" aria-labelledby="modalRemoverAmbiente" aria-hidden="true">
		<div class="modal-dialog">
	    	<div class="modal-content">
			</div><!-- /.modal-content -->
		</div><!-- /.modal-dialog -->
	</div><!-- /.modal -->
	
{include file="FragmentoConteudoRodape.html"} 
{include file="FragmentoRodape.html"}
{/if}
